﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using DAL;

namespace BLL
{
    public class NhaccController
    {
        tbNhacc obj = new tbNhacc();
        public DataTable bllDSNhacc(string mancc)
        {
            obj.Mancc = mancc;
            return obj.dalDSNhacc();
        }
        public bool bllThemNhacc(string tencc, string diachi, string email, string sdt)
        {
            bool res = false;
            obj.Tenncc = tencc;
            obj.Diachi = diachi;
            obj.Email = email;
            obj.Sdt = sdt;
            res = obj.dalThemNhacc();
            return res;
        }
        public bool bllSuaNhacc(string tencc, string diachi, string email, string sdt,string mancc)
        {
            bool res = false;
            obj.Tenncc = tencc;
            obj.Diachi = diachi;
            obj.Email = email;
            obj.Sdt = sdt;
            obj.Mancc = mancc;
            res = obj.dalSuaNhacc();
            return res;
        }
        public bool bllXoaNhacc(string mancc)
        {
            bool res = false;
            obj.Mancc = mancc;
            res = obj.dalXoaNhacc();
            return res;
        }
    }
}
